<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<?php echo ($headHtml); ?>
<body>
<?php echo ($head_navlist); ?>
<!-- banner -->
<div class="banner">
    <div class="swiper-wrapper">
        <?php
 $_id = intval($headInfo[banner_select_id]); $where = array('aid'=> $_id, 'status' => 1); $limit = "4"; $abc_cate = M('abc')->find($_id); if ($abc_cate) { $limit = empty($limit) ? $abc_cate['num'] : $limit; $where['starttime'] = array('lt', time()); $where['endtime'] = array('gt', time()); $_abc = M('abcDetail')->where($where)->order('sort')->limit($limit)->select(); }else { $_abc = array(); } if (empty($_abc)) { $_abc = array(); } foreach($_abc as $autoindex => $abc): $abc['width'] = $abc_cate['width']; $abc['height'] = $abc_cate['height']; ?><div class="swiper-slide"><a href="javascript:void(0)"><img src="<?php echo ($abc[content]); ?>" alt="" /></a></div><?php endforeach;?>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
</div>
<!-- 主体部分 -->
<section class="content">
    <!-- 新闻资讯 -->
    <section class="box brand_content">
        <div class="location">
            <a href="">当前位置</a>-<a href="/pn_<?=$headInfo[ename]?>"><?php echo ($headInfo[name]); ?></a>-
            <?php if($headInfo[id]==$catalogSelect[id]): ?>
                <a href="">全部新闻</a>
            <?php else: ?>
                <a href="/pn_<?=$catalogSelect[ename]?>"><?php echo ($catalogSelect[name]); ?></a>
            <?php endif; ?>
        </div>
        <div class="fullBox">
            <div class="navListBox clear">
                <a href="/pn_<?=$headInfo[ename]?>" class="Join_list <?=$headInfo[id]==$catalogSelect[id]?'tab_active':''?>"><p>全部新闻</p></a>
                <?php $i=0; ?>
                <?php
 $_typeid = $headInfo[id]; if($_typeid == -1) $_typeid = I('cid', 0, 'intval'); $_fieldflag = 0; if($_fieldflag == 0){ $_navlist = get_category(1); }else{ $_navlist = M('category')->where(['status'=>1])->order('sort asc')->select(); } if($_typeid == 0) { $_navlist = Common\Lib\Category::toLayer($_navlist); }else { $_navlist = Common\Lib\Category::toLayer($_navlist, 'child', $_typeid); } foreach($_navlist as $autoindex => $navlist): $navlist['url'] = get_url($navlist); if($i==1): ?>
                    <a href="/pn_<?=$navlist[ename]?>" class="Join_list <?=$activeCatalogId==$navlist[id]?'tab_active':''?>" style="margin-right: 0%"><p><?php echo ($navlist["name"]); ?></p></a>
                    <?php else: ?>
                    <a href="/pn_<?=$navlist[ename]?>" class="Join_list <?=$activeCatalogId==$navlist[id]?'tab_active':''?>"><p><?php echo ($navlist["name"]); ?></p></a>
                    <?php endif; ?>
                    <?php $i++; endforeach;?>
            </div>
        </div>
        <header class="brand_title">
            <h1><?=$headInfo[id]==$catalogSelect[id]?'全部新闻':$catalogSelect[name]?></h1>
        </header>
        <ul class="index_news_list news_list clear">
            <?php
 $_typeid = $catalogSelect[id]; $_keyword = ""; $_arcid = ""; if($_typeid == -1) $_typeid = I('get.cid', 0, 'intval'); if ($_typeid>0 || substr($_typeid,0,1) == '$') { $ids = Common\Lib\Category::getChildsId(get_category(), $_typeid, true); $where = array('article.status' => 0, 'article.cid'=> array('IN',$ids)); }else { $where = array('article.status' => 0); } if ($_keyword != '') { $where['article.title'] = array('like','%'.$_keyword.'%'); } if (!empty($_arcid)) { $where['article.id'] = array('IN', $_arcid); } if (0 > 0) { $where['_string'] = 'article.flag & 0 = 0 '; } if (0 > 0) { $count = D2('ArcView','article')->where($where)->count(); $ename = I('e', '', 'htmlspecialchars,trim'); if (!empty($ename) && C('URL_ROUTER_ON') == true) { $param['p'] = I('p', 1, 'intval'); $param_action = '/'.$ename; }else { $param = array(); $param_action = ''; } $thisPage = new \Common\Lib\Page($count, 0, $param, $param_action); $thisPage->rollPage = 5; $thisPage->setConfig('theme'," %FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%"); $limit = $thisPage->firstRow. ',' .$thisPage->listRows; $page = $thisPage->show(); }else { $limit = "$selectPage,$pageCount"; } $_artlist = D2('ArcView','article')->nofield('content')->where($where)->order("id DESC")->limit($limit)->select(); if (empty($_artlist)) { $_artlist = array(); } foreach($_artlist as $autoindex => $artlist): $_jumpflag = ($artlist['flag'] & B_JUMP) == B_JUMP? true : false; $artlist['url'] = get_content_url($artlist['id'], $artlist['cid'], $artlist['ename'], $_jumpflag, $artlist['jumpurl']); if(0) $artlist['title'] = str2sub($artlist['title'], 0, 0); if(0) $artlist['description'] = str2sub($artlist['description'], 0, 0); ?><li>
                    <a href="/article_<?=$artlist[id]?>">
                        <span class="index_news_list_time"><?=date('m-d',$artlist[publishtime])?></span>
                        <div class="index_news_list_img"><img src="<?php echo ($artlist["litpic"]); ?>" alt=""></div>
                        <p class="index_news_list_txt"><?php echo ($artlist["title"]); ?></p>
                    </a>
                </li><?php endforeach;?>
        </ul>
        <div class="news_page">
            <a href="/news_<?=$catalogSelect[id]?>_<?=($selectPage==0?0:$selectPage-$pageCount)?>">上一页</a>
            <?php for($i=0;$i<$newsCount/$pageCount;$i++): ?>
                <a class="<?=$i*$pageCount==$selectPage?'news_page_active':''?>" href="/news_<?=$catalogSelect[id]?>_<?=$i*$pageCount?>"><?=$i+1?></a>
            <?php endfor; ?>
            <a href="/news_<?=$catalogSelect[id]?>_<?=($selectPage+$pageCount>=$newsCount?$selectPage:$selectPage+$pageCount)?>">下一页</a>
        </div>
    </section>
</section>
<?php echo ($footHtml); ?>
<script>
    swiperBanner();
</script>
</body>
</html>